#include "acq_vendor.h"

int main(int argc, char *argv[])
{
    HTELINK_LOG_ENABLE(true);

	if (getenv(VENDOR_RUN_PATH_ENV) == nullptr) {
		HTELINK_LOG_INFO("execute env not set");
		std::string exe_dir = get_current_dir_name();
		setenv(VENDOR_RUN_PATH_ENV, exe_dir.c_str(), 1);
	}

	HTELINK_LOG_INFO("execute directory is %s", getenv(VENDOR_RUN_PATH_ENV));
    vendor::VendorBase *vdor = new iot_acq::AcqVendor();
    if (vendor::VendorBase::ParseOptionArgs(vdor, argc, argv) != 0) {
        exit(-1);
    }
    return vdor->Exec();
}